package com.sdppf.action;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.sdppf.service.APageIndexService;

/**
 * 分页页码
 * @author ZXJ jimantou@gmail.com
 *
 */
public class APageIndexAction {
	public String execute() throws Exception{
		
		int pageIndex = this.aPageIndexService.GetIndex(this.pageDateType,pageContainNum);
		
		HttpServletResponse response = ServletActionContext.getResponse();
		response.setCharacterEncoding("UTF-8");
		response.getWriter().write(((Integer)pageIndex).toString());
		
		System.out.println(pageIndex);
		return null;
	}
	
	private String pageDateType;

	public String getPageDateType() {
		return pageDateType;
	}

	public void setPageDateType(String pageDateType) {
		this.pageDateType = pageDateType;
	}
	
	private APageIndexService aPageIndexService;

	public APageIndexService getaPageIndexService() {
		return aPageIndexService;
	}

	public void setaPageIndexService(APageIndexService aPageIndexService) {
		this.aPageIndexService = aPageIndexService;
	}
	private int pageContainNum;

	public int getPageContainNum() {
		return pageContainNum;
	}

	public void setPageContainNum(int pageContainNum) {
		this.pageContainNum = pageContainNum;
	}
}
